﻿namespace question2
{
    public class Employee
    {
        private int employeeId;       
        private string name;         
        private int age;                
        private string position;      
        private decimal salary;      
        private DateTime hireDate;  
        public Employee()
        {
        }
        public Employee(int employeeId, string name, int age,
                       string position, decimal salary, DateTime hireDate)
        {
            this.employeeId = employeeId;
            this.name = name;
            this.age = age;
            this.position = position;
            this.salary = salary;
            this.hireDate = hireDate;
        }

        public int EmployeeId
        {
            get { return employeeId; }
            set { employeeId = value; }
        }

        public string Name
        {
            get { return name; }
            set { name = value; }
        }

        public int Age
        {
            get { return age; }
            set { age = value; }
        }


        public string Position
        {
            get { return position; }
            set { position = value; }
        }

        public decimal Salary
        {
            get { return salary; }
            set { salary = value; }
        }

        public DateTime HireDate
        {
            get { return hireDate; }
            set { hireDate = value; }
        }

        public void DisplayInfo()
        {
            Console.WriteLine("===== 员工信息 =====");
            Console.WriteLine($"员工编号: {employeeId}");
            Console.WriteLine($"姓名: {name}");
            Console.WriteLine($"年龄: {age}");
            Console.WriteLine($"职位: {position}");
            Console.WriteLine($"薪资: {salary:C}");
            Console.WriteLine($"入职日期: {hireDate:yyyy年MM月dd日}");
            Console.WriteLine("===================\n");
        }
    }
    public class Program
    {
        public static void Main()
        {
            Employee emp1 = new Employee(
                1001,
                "张三",
                20,
                "软件工程师",
                8000,
                new DateTime(2025, 9, 15)
            );
            emp1.DisplayInfo();
        }
    }
}
